clear all;
clc;
%x=r*sin(theta)
%y=r*cos(theta)
figure(1)
ezplot('r*sin(theta)','r*cos(theta)',[0,2*pi]);
%x=r*sin(fai)*cos(theta)
%y=r*sin(fai)*sin(theta)
%z=r*cos(fai)
figure(2)
ezsurf('r*sin(fai)*cos(theta)','r*sin(fai)*sin(theta)','r*cos(fai)',[0,pi,0,2*pi]);
hold on
f=@(x,y)x.^2+y.^2-r*x;
ezsurf(f,[-1.5,2.5],[-2,1.5]);
axis equal;
view(30,45);